package com.llb.entity;


import com.llb.annotation.ImportColumn;
import com.llb.utils.DMUtil;

import java.util.List;

/**
 * @ClassName ZjjhBean
 * @Description TODO
 * @Author liang
 * @Date 2019/3/19 21:34
 * @Version 1.0
 **/
public class ZjjhBean {
    @ImportColumn(index = 0)
    private String xxh;
    @ImportColumn(index = 1)
    private String id;
    @ImportColumn(index = 2)
    private String sbywxtbm;
    @ImportColumn(index = 3)
    private String sbjbjg_dm;
    @ImportColumn(index = 4)
    private String tcqbm_dm;
    @ImportColumn(index = 5)
    private String xzqh_dm;
    @ImportColumn(index = 6)
    private String zjtzlsh;
    @ImportColumn(index = 7)
    private String dzsphm;
    @ImportColumn(index = 8)
    private String gebh;
    @ImportColumn(index = 9)
    private String xm;
    @ImportColumn(index = 10)
    private String sbhm;
    @ImportColumn(index = 11)
    private String dwbh;
    @ImportColumn(index = 12)
    private String dwmc;
    @ImportColumn(index = 13)
    private String tyshxydm;
    @ImportColumn(index = 14)
    private String zzjg_dm;
    @ImportColumn(index = 15)
    private String sfzjlx_dm;
    @ImportColumn(index = 16)
    private String zjhm;
    @ImportColumn(index = 17)
    private String jflx;
    @ImportColumn(index = 18)
    private String xzlx_dm;
    @ImportColumn(index = 19)
    private String fkssqq;
    @ImportColumn(index = 20)
    private String fkssqz;
    @ImportColumn(index = 21)
    private String yjje;
    @ImportColumn(index = 22)
    private String sfyxbzejf;
    @ImportColumn(index = 23)
    private String jfxxscrq;
    @ImportColumn(index = 24)
    private String sbscczy;
    @ImportColumn(index = 25)
    private String zszt_dm;
    @ImportColumn(index = 26)
    private String jfbs;
    @ImportColumn(index = 27)
    private String jfrlx;
    @ImportColumn(index = 28)
    private String sjsj;
    @ImportColumn(index = 29)
    private String rgksj;
    @ImportColumn(index = 30)
    private String bz;
    @ImportColumn(index = 31)
    private String tsjflx_dm;
    @ImportColumn(index = 32)
    private String sjcslx;
    @ImportColumn(index = 33)
    private String cspch;
    @ImportColumn(index = 34)
    private String cssjc;
    @ImportColumn(index = 35)
    private String jfmxlsh;
    @ImportColumn(index = 36)
    private String dwyjje;
    @ImportColumn(index = 37)
    private String gryjje;
    @ImportColumn(index = 38)
    private String yjznj;
    @ImportColumn(index = 39)
    private String yjlx;
    @ImportColumn(index = 40)
    private String dwsjje;
    @ImportColumn(index = 41)
    private String grsjje;
    @ImportColumn(index = 42)
    private String sjznj;
    @ImportColumn(index = 43)
    private String sjlx;
    @ImportColumn(index = 44)
    private String sbuuid;
    @ImportColumn(index = 45)
    private String xh;
    @ImportColumn(index = 46)
    private String hxbz;
    @ImportColumn(index = 47)
    private String headid;
    @ImportColumn(index = 48)
    private String lrrq;
    @ImportColumn(index = 49)
    private String zhyxjfrq;

    @Override
    public String toString() {
        return "ZjjhBean{" +
                "xxh='" + xxh + '\'' +
                ", id='" + id + '\'' +
                ", sbywxtbm='" + sbywxtbm + '\'' +
                ", sbjbjg_dm='" + sbjbjg_dm + '\'' +
                ", tcqbm_dm='" + tcqbm_dm + '\'' +
                ", xzqh_dm='" + xzqh_dm + '\'' +
                ", zjtzlsh='" + zjtzlsh + '\'' +
                ", dzsphm='" + dzsphm + '\'' +
                ", gebh='" + gebh + '\'' +
                ", xm='" + xm + '\'' +
                ", sbhm='" + sbhm + '\'' +
                ", dwbh='" + dwbh + '\'' +
                ", dwmc='" + dwmc + '\'' +
                ", tyshxydm='" + tyshxydm + '\'' +
                ", zzjg_dm='" + zzjg_dm + '\'' +
                ", sfzjlx_dm='" + sfzjlx_dm + '\'' +
                ", zjhm='" + zjhm + '\'' +
                ", jflx='" + jflx + '\'' +
                ", xzlx_dm='" + xzlx_dm + '\'' +
                ", fkssqq='" + fkssqq + '\'' +
                ", fkssqz='" + fkssqz + '\'' +
                ", yjje='" + yjje + '\'' +
                ", sfyxbzejf='" + sfyxbzejf + '\'' +
                ", jfxxscrq='" + jfxxscrq + '\'' +
                ", sbscczy='" + sbscczy + '\'' +
                ", zszt_dm='" + zszt_dm + '\'' +
                ", jfbs='" + jfbs + '\'' +
                ", jfrlx='" + jfrlx + '\'' +
                ", sjsj='" + sjsj + '\'' +
                ", rgksj='" + rgksj + '\'' +
                ", bz='" + bz + '\'' +
                ", tsjflx_dm='" + tsjflx_dm + '\'' +
                ", sjcslx='" + sjcslx + '\'' +
                ", cspch='" + cspch + '\'' +
                ", cssjc='" + cssjc + '\'' +
                ", jfmxlsh='" + jfmxlsh + '\'' +
                ", dwyjje='" + dwyjje + '\'' +
                ", gryjje='" + gryjje + '\'' +
                ", yjznj='" + yjznj + '\'' +
                ", yjlx='" + yjlx + '\'' +
                ", dwsjje='" + dwsjje + '\'' +
                ", grsjje='" + grsjje + '\'' +
                ", sjznj='" + sjznj + '\'' +
                ", sjlx='" + sjlx + '\'' +
                ", sbuuid='" + sbuuid + '\'' +
                ", xh='" + xh + '\'' +
                ", hxbz='" + hxbz + '\'' +
                ", headid='" + headid + '\'' +
                ", lrrq='" + lrrq + '\'' +
                ", zhyxjfrq='" + zhyxjfrq + '\'' +
                '}';
    }

    public String getXxh() {
        return xxh;
    }

    public void setXxh(String xxh) {
        this.xxh = xxh;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getSbywxtbm() {
        return sbywxtbm;
    }

    public void setSbywxtbm(String sbywxtbm) {
        this.sbywxtbm = sbywxtbm;
    }

    public String getSbjbjg_dm() {
        return sbjbjg_dm;
    }

    public void setSbjbjg_dm(String sbjbjg_dm) {
        this.sbjbjg_dm = sbjbjg_dm;
    }

    public String getTcqbm_dm() {
        return tcqbm_dm;
    }

    public void setTcqbm_dm(String tcqbm_dm) {
        this.tcqbm_dm = tcqbm_dm;
    }

    public String getXzqh_dm() {
        return xzqh_dm;
    }

    public void setXzqh_dm(String xzqh_dm) {
        this.xzqh_dm = xzqh_dm;
    }

    public String getZjtzlsh() {
        return zjtzlsh;
    }

    public void setZjtzlsh(String zjtzlsh) {
        this.zjtzlsh = zjtzlsh;
    }

    public String getDzsphm() {
        return dzsphm;
    }

    public void setDzsphm(String dzsphm) {
        this.dzsphm = dzsphm;
    }

    public String getGebh() {
        return gebh;
    }

    public void setGebh(String gebh) {
        this.gebh = gebh;
    }

    public String getXm() {
        return xm;
    }

    public void setXm(String xm) {
        this.xm = xm;
    }

    public String getSbhm() {
        return sbhm;
    }

    public void setSbhm(String sbhm) {
        this.sbhm = sbhm;
    }

    public String getDwbh() {
        return dwbh;
    }

    public void setDwbh(String dwbh) {
        this.dwbh = dwbh;
    }

    public String getDwmc() {
        return dwmc;
    }

    public void setDwmc(String dwmc) {
        this.dwmc = dwmc;
    }

    public String getTyshxydm() {
        return tyshxydm;
    }

    public void setTyshxydm(String tyshxydm) {
        this.tyshxydm = tyshxydm;
    }

    public String getZzjg_dm() {
        return zzjg_dm;
    }

    public void setZzjg_dm(String zzjg_dm) {
        this.zzjg_dm = zzjg_dm;
    }

    public String getSfzjlx_dm() {
        return sfzjlx_dm;
    }

    public void setSfzjlx_dm(String sfzjlx_dm) {
        this.sfzjlx_dm = sfzjlx_dm;
    }

    public String getZjhm() {
        return zjhm;
    }

    public void setZjhm(String zjhm) {
        this.zjhm = zjhm;
    }

    public String getJflx() {
        return jflx;
    }

    public void setJflx(String jflx) {
        this.jflx = jflx;
    }

    public String getXzlx_dm() {
        return xzlx_dm;
    }

    public void setXzlx_dm(String xzlx_dm) {
        this.xzlx_dm = xzlx_dm;
    }

    public String getFkssqq() {
        return fkssqq;
    }

    public void setFkssqq(String fkssqq) {
        this.fkssqq = fkssqq;
    }

    public String getFkssqz() {
        return fkssqz;
    }

    public void setFkssqz(String fkssqz) {
        this.fkssqz = fkssqz;
    }

    public String getYjje() {
        return yjje;
    }

    public void setYjje(String yjje) {
        this.yjje = yjje;
    }

    public String getSfyxbzejf() {
        return sfyxbzejf;
    }

    public void setSfyxbzejf(String sfyxbzejf) {
        this.sfyxbzejf = sfyxbzejf;
    }

    public String getJfxxscrq() {
        return jfxxscrq;
    }

    public void setJfxxscrq(String jfxxscrq) {
        this.jfxxscrq = jfxxscrq;
    }

    public String getSbscczy() {
        return sbscczy;
    }

    public void setSbscczy(String sbscczy) {
        this.sbscczy = sbscczy;
    }

    public String getZszt_dm() {
        return zszt_dm;
    }

    public void setZszt_dm(String zszt_dm) {
        this.zszt_dm = zszt_dm;
    }

    public String getJfbs() {
        return jfbs;
    }

    public void setJfbs(String jfbs) {
        this.jfbs = jfbs;
    }

    public String getJfrlx() {
        return jfrlx;
    }

    public void setJfrlx(String jfrlx) {
        this.jfrlx = jfrlx;
    }

    public String getSjsj() {
        return sjsj;
    }

    public void setSjsj(String sjsj) {
        this.sjsj = sjsj;
    }

    public String getRgksj() {
        return rgksj;
    }

    public void setRgksj(String rgksj) {
        this.rgksj = rgksj;
    }

    public String getBz() {
        return bz;
    }

    public void setBz(String bz) {
        this.bz = bz;
    }

    public String getTsjflx_dm() {
        return tsjflx_dm;
    }

    public void setTsjflx_dm(String tsjflx_dm) {
        this.tsjflx_dm = tsjflx_dm;
    }

    public String getSjcslx() {
        return sjcslx;
    }

    public void setSjcslx(String sjcslx) {
        this.sjcslx = sjcslx;
    }

    public String getCspch() {
        return cspch;
    }

    public void setCspch(String cspch) {
        this.cspch = cspch;
    }

    public String getCssjc() {
        return cssjc;
    }

    public void setCssjc(String cssjc) {
        this.cssjc = cssjc;
    }

    public String getJfmxlsh() {
        return jfmxlsh;
    }

    public void setJfmxlsh(String jfmxlsh) {
        this.jfmxlsh = jfmxlsh;
    }

    public String getDwyjje() {
        return dwyjje;
    }

    public void setDwyjje(String dwyjje) {
        this.dwyjje = dwyjje;
    }

    public String getGryjje() {
        return gryjje;
    }

    public void setGryjje(String gryjje) {
        this.gryjje = gryjje;
    }

    public String getYjznj() {
        return yjznj;
    }

    public void setYjznj(String yjznj) {
        this.yjznj = yjznj;
    }

    public String getYjlx() {
        return yjlx;
    }

    public void setYjlx(String yjlx) {
        this.yjlx = yjlx;
    }

    public String getDwsjje() {
        return dwsjje;
    }

    public void setDwsjje(String dwsjje) {
        this.dwsjje = dwsjje;
    }

    public String getGrsjje() {
        return grsjje;
    }

    public void setGrsjje(String grsjje) {
        this.grsjje = grsjje;
    }

    public String getSjznj() {
        return sjznj;
    }

    public void setSjznj(String sjznj) {
        this.sjznj = sjznj;
    }

    public String getSjlx() {
        return sjlx;
    }

    public void setSjlx(String sjlx) {
        this.sjlx = sjlx;
    }

    public String getSbuuid() {
        return sbuuid;
    }

    public void setSbuuid(String sbuuid) {
        this.sbuuid = sbuuid;
    }

    public String getXh() {
        return xh;
    }

    public void setXh(String xh) {
        this.xh = xh;
    }

    public String getHxbz() {
        return hxbz;
    }

    public void setHxbz(String hxbz) {
        this.hxbz = hxbz;
    }

    public String getHeadid() {
        return headid;
    }

    public void setHeadid(String headid) {
        this.headid = headid;
    }

    public String getLrrq() {
        return lrrq;
    }

    public void setLrrq(String lrrq) {
        this.lrrq = lrrq;
    }

    public String getZhyxjfrq() {
        return zhyxjfrq;
    }

    public void setZhyxjfrq(String zhyxjfrq) {
        this.zhyxjfrq = zhyxjfrq;
    }





    public  String parse()  {
        StringBuffer sbyyBuffer = new StringBuffer();

        if(this.sbywxtbm == null || this.sbywxtbm.length() == 0){
            sbyyBuffer.append("社保业务系统编码为空;");
        }else if(this.sbywxtbm.length() > 10){
            sbyyBuffer.append("社保业务系统编码长度不能超过10位;");
        }else if(!DMUtil.checkDM(this.sbywxtbm,CS_SBF_APP.class)){
            sbyyBuffer.append("社保业务系统编码不存在;");
        }

        if(this.sbjbjg_dm == null || this.sbjbjg_dm.length() == 0){
            sbyyBuffer.append("社保经办机构为空;");
        }else if(this.sbjbjg_dm.length() > 20){
            sbyyBuffer.append("社保经办机构长度不能超过20位;");
        }else if(!DMUtil.checkDM(this.sbjbjg_dm,DM_SBF_SBJBJG.class)){
            sbyyBuffer.append("社保经办机构不存在;");
        }

        if(this.tcqbm_dm == null || this.tcqbm_dm.length() == 0){
            sbyyBuffer.append("统筹区编码为空;");
        }else if(this.tcqbm_dm.length() > 6){
            sbyyBuffer.append("统筹区编码为空长度不能超过6位;");
        }else if(!DMUtil.checkDM(this.tcqbm_dm,DM_SBF_RS_XZQH.class)){
            sbyyBuffer.append("统筹区编码不存在;");
        }

        if(this.xzqh_dm == null || this.xzqh_dm.length() == 0){
            sbyyBuffer.append("行政区划为空");
        }else if(this.xzqh_dm.length() > 6){
            sbyyBuffer.append("行政区划为空为空长度不能超过6位;");
        }else if(!DMUtil.checkDM(this.xzqh_dm,DM_SBF_RS_XZQH.class)){
            sbyyBuffer.append("行政区划不存在;");
        }

        if(this.zjtzlsh == null || this.zjtzlsh.length() == 0){
            sbyyBuffer.append("征集通知流水号为空;");
        }else if(this.zjtzlsh.length() > 20){
            sbyyBuffer.append("征集通知流水号超过20位;");
        }

        if(this.dzsphm.length() > 0){
            sbyyBuffer.append("电子税票号不可填;");
        }

        if(this.gebh.length() > 0){
            sbyyBuffer.append("个人编号不可填;");
        }

        if(this.xm.length() > 0){
            sbyyBuffer.append("姓名不可填;");
        }

        if(this.sbhm.length() > 0){
            sbyyBuffer.append("社保号码不可填;");
        }

        if(this.dwbh == null || this.dwbh.length() == 0){
            sbyyBuffer.append("单位编号不可为空;");
        }else if(this.dwbh.length() > 20){
            sbyyBuffer.append("单位编号不能超过20位;");
        }

        if(this.dwmc == null || this.dwmc.length() == 0){
            sbyyBuffer.append("单位名称不可为空;");
        }

        if(this.tyshxydm != null && this.tyshxydm.length() > 18){
            sbyyBuffer.append("统一社会信用代码超過18位,此列可以不填;");
        }

        if(this.sfzjlx_dm.length() > 0){
            sbyyBuffer.append("身份证件类型不可填;");
        }

        if(this.dzsphm.length() > 0){
            sbyyBuffer.append("证件号码不可填;");
        }

        /*
        if(this.jfrlx.equals("3") || this.jfrlx.length() == 0){

        }else {
            sbyyBuffer.append("缴费人类型不对;");
        }
        */
        if(this.xzlx_dm == null || this.xzlx_dm.length() == 0){
            sbyyBuffer.append("险种类型不可为空;");
        }else if(this.xzlx_dm.length() > 3){
            sbyyBuffer.append("险种类型超过3位;");
        }else if(!DMUtil.checkDM(this.xzlx_dm,DM_SBF_RS_XZLX.class)){
            sbyyBuffer.append("险种类型不存在;");
        }



        if(this.fkssqq == null || this.fkssqq.length() == 0){
            sbyyBuffer.append("费款所属期起不可为空;");
        }else if(this.fkssqq.length() > 6){
            sbyyBuffer.append("费款所属期起超过6位;");
        }

        if(this.fkssqz == null || this.fkssqz.length() == 0){
            sbyyBuffer.append("费款所属期止不可为空");
        }else if(this.fkssqz.length() > 6){
            sbyyBuffer.append("费款所属期止超过6位;");
        }


        if(this.jfxxscrq == null || this.jfxxscrq.length() == 0){
            sbyyBuffer.append("缴费信息生成日期不可为空;");
        }

        /*
        if(!this.tsjflx_dm.equals("10") && this.tsjflx_dm.length() != 0){
            sbyyBuffer.append("特殊缴费类型值不對,线下征缴计划需要固定为10;");
        }
        */
        if(this.sjcslx == null || this.sjcslx.length() == 0){
            sbyyBuffer.append("数据传输类型不可为空;");
        }else if(!(this.sjcslx.equals("1") || this.sjcslx.equals("6")) ){
            sbyyBuffer.append("数据传输类型值不对,1为新增,6为撤销;");
        }

        if(this.dwyjje == null || this.dwyjje.length() == 0){
            sbyyBuffer.append("单位应缴金额不可为空;");
        }else if(this.dwyjje.contains("-")){
            sbyyBuffer.append("单位应缴金额不可为负数;");
        }

        if(this.gryjje == null || this.gryjje.length() == 0){
            sbyyBuffer.append("个人应缴金额不可为空;");
        }else if(this.gryjje.contains("-")){
            sbyyBuffer.append("个人应缴金额不可为负数;");
        }

        if(this.yjznj == null || this.yjznj.length() == 0){
            sbyyBuffer.append("应缴滞纳金不可为空;");
        }else if(this.yjznj.contains("-")){
            sbyyBuffer.append("应缴滞纳金不可为负数;");
        }

        if(this.yjlx == null || this.yjlx.length() == 0){
            sbyyBuffer.append("应缴利息不可为空;");
        }else if(this.yjlx.contains("-")){
            sbyyBuffer.append("应缴利息不不可为负数;");
        }

        if(this.sbuuid == null || this.sbuuid.length() == 0){
            sbyyBuffer.append("sbuuid不可为空");
        }else if(this.sbuuid.length() > 30){
            sbyyBuffer.append("sbuuid超过30位;");
        }

        String result = sbyyBuffer.toString();
        String nullResult = "社保业务系统编码为空;社保经办机构为空;统筹区编码为空;行政区划为空征集通知流水号为空;单位编号不可为空;单位名称不可为空;险种类型不可为空;费款所属期起不可为空;费款所属期止不可为空缴费信息生成日期不可为空;数据传输类型不可为空;单位应缴金额不可为空;个人应缴金额不可为空;应缴滞纳金不可为空;应缴利息不可为空;sbuuid不可为空";
        if(nullResult.equals(result)){
            result = "有空行";
        }


        return result;

    }


}
